import request from "../utils/request";

export const getAllShowService = (pageNum,pageSize) => {
    const params={'pageNum':pageNum,'pageSize':pageSize}
    return request.get("/show/getAllShow", {params:params})
}

export const getShowByIdService = (id) => {
    const params = new URLSearchParams()
    params.append('id', id)
    return request.get("/show/getShowById", params)
}

export const getShowByClassifyService = (classify) => {
    const params = new URLSearchParams()
    params.append('classify', classify)
    return request.get("/show/getShowByClassify", params)
}

export const insertShowService = (form) => {
    const params = new URLSearchParams()
    for(let key in form){
        params.append(key,form[key])
    }
    return request.post("/show/insertShow", params)
}

export const deleteShowService = (id) => {
    const params = new URLSearchParams()
    params.append('id', id)
    return request.put("/show/deleteShow", params)
}